#define _CRT_SECURE_NO_WARNINGS 1

#include<stdio.h>

int main() {
    int a[1000] = { 0 };
    int n, m, s;
    scanf("%d", &n);
    scanf("%d", &m);
    for (int i = 0; i < n * m; i++) {
        for (int j = 0; j < m; j++) {
            scanf("%d", &s);
            a[i] += s;
        }
    }
    int max = a[0];
    for (int i = 1; i < n; i++) {
        if (max < a[i]) {
            max = a[i];
        }
    }
    printf("%d", max);
    return 0;
}